<template>
    <base-panel>
        <top-simple-search @searchFun="query"
        >
          <el-form-item label="" >
            <el-date-picker
              v-model="selectDate"
              type="daterange"
              range-separator="至"
              start-placeholder="开始日期"
              size="small"
              format="yyyy-MM-dd"
              value-format="yyyy-MM-dd"
              end-placeholder="结束日期">
            </el-date-picker>
          </el-form-item>
          <el-form-item label="" >
            <el-input placeholder="修改人" v-model="searchParams.edit_user" size="small" style="width: 200px;" clearable></el-input>
          </el-form-item>
        </top-simple-search>
        <simple-table ref="myTable">
            <my-table-column align="left" prop="title" label="标题"></my-table-column>
            <el-table-column align="left" prop="original" label="原意见" show-tooltip-when-overflow>
            </el-table-column>
            <el-table-column align="left" prop="pub_user" label="提交人" width="120">
            </el-table-column>
            <el-table-column align="left" prop="modifi" label="修改意见" show-tooltip-when-overflow/>
            <el-table-column align="left" prop="edit_user" label="修改人" width="120"/>
            <my-time-column align="left" prop="gmt_created" label="修改时间" width="170"/>
        </simple-table>
    </base-panel>
</template>

<script>
    import MyTableColumn from '@/components/TableColumn/MyTableColumn'
    import MyTimeColumn from '@/components/TableColumn/MyTimeColumn'
    export default {
        name: "menuButton",
      components: { MyTimeColumn, MyTableColumn },
      data() {
            return {
                visible: false,
                currRow: {},
                disabled:false,
                searchParams:{starttime:"",endtime:"",edit_user:undefined},
                selectDate:[]
            };
        },
        created() {},
        watch: {},
        methods: {
          query(queryData) {
            this.searchParams.search_value = queryData
            if (this.selectDate) {
              this.searchParams.starttime = this.selectDate[0]
              this.searchParams.endtime = this.selectDate[1]
            } else {
              this.searchParams.starttime = ""
              this.searchParams.endtime = ""
            }
            this.$refs["myTable"].searchList(this.searchParams);
          },
        }
    };
</script>
